// let position: number[] = [116.2317, 39.5427] // 数组的元素都是数值类型
/* 
元组是另一种特殊的数组：

 它确切地包含多少个元素
 特定索引对应的类型
*/
{
	type Position = [string | number, number]

	let p1: Position = [ 116.2317, 39.5427 ]
	let p2: Position = [ '116.2317', 39.5427 ]

	function useState(n: number): [number, (n: number) => void] {
		const fn = (n: number): void => {}

		return [ n, fn ]
	}

	const [ state, setstate ] = useState(10)

	// setstate('1')
}
